FROM cptactionhank/atlassian-confluence:latest
LABEL MAINTAINER shihongtao@tsari.tsinghua.edu.cn

USER root

# 将代理破解包加入容器
# RUN mkdir track
# RUN echo $(ls)
# RUN curl -SL https://files.gitee.com/group1/M00/09/AE/wKgCNF2esMuAGcTHAA-Dj0IPx9M4671.gz?token=b20d4ad56bc858ff479f871d9a45999f&ts=1619065462&attname=atlassian-agent-v1.2.3.tar.gz&disposition=attachment | tar -xzC ./track 
# RUN mv track/atlassian-agent-v1.2.3/atlassian-agent.jar /opt/atlassian/confluence/

ADD atlassian-agent.jar /opt/atlassian/confluence/

ENV TZ=Asia/Shanghai


# 设置启动加载代理包
RUN echo 'export CATALINA_OPTS="-javaagent:/opt/atlassian/confluence/atlassian-agent.jar ${CATALINA_OPTS}"' >> /opt/atlassian/confluence/bin/setenv.sh

EXPOSE 8090
